def getRes():
    return {'code': 0,
           'count': 0,
           'data': [],
           'msg': ''}

def getErrorRes(msg='你输入的参数有误！'):
    return {'code': 402,
           'count': 0,
           'data': [],
           'msg': msg}

def getSuccessRes(msg='获取成功',data=[],count=0):
    return {'code': 0,
           'count': count,
           'data': data,
           'msg': msg}
def getDataRes(data=0):
    res ={'code': 1,'count': 0,'data': data,'msg':'数据修改失败！'}
    if data == 0:
        return res
    else:
        res['code'] = 0
        res['msg'] = "数据执行成功！"
        return res;
if __name__ == "__main__":
    res = getRes()
    res["code"]=402
    print(res)
    res1 = getRes()
    print(res1)